<script type="text/javascript">
    // 用于理解js 创建对象，理解原型的概念

    // xiaoming.constructor === Student.prototype.constructor; // true
    // Student.prototype.constructor === Student; // true

    // Object.getPrototypeOf(xiaoming) === Student.prototype; // true

    // xiaoming instanceof Student; // true

    function Student(name) {
        this.name = name;
        this.hello = function() {
            alert('hello,'+ this.name);
        }
    }

    var xiaoming = new Student('xiaoming')
    alert(xiaoming.name);
</script>